<%@include file="/pages/include/tag_include.jsp"%>
<%@include file="/pages/include/base_context.jsp"%>

<script>
    var BTN_ARRAY = [
        {btnName :'btn-qr-01'} , {btnName :'btn-qr-02'} , {btnName :'btn-qr-03'} , {btnName :'btn-qr-04'} , {btnName :'btn-qr-05'},
        {btnName :'btn-ev-01'},{btnName :'btn-ev-02'},{btnName :'btn-ev-03'},
        {btnName :'btn-qw-01'},{btnName :'btn-qw-02'}
    ];
    jQuery(document).ready(function($){
        $.each(BTN_ARRAY,function(index,obj){
            // binding for inital blue spot
            $('.'+obj.btnName).each(function(){
                if($('#'+obj.btnName+'-field').val() === $(this).text()){
                    $(this).addClass('btn-info');
                }
                
            });
            
            $('.'+obj.btnName).click(function(){
                $('.'+obj.btnName).removeClass('btn-info');
                $(this).addClass('btn-info');
                $('#'+obj.btnName+'-field').val($(this).text());
                //console.log($(this).text());
            });
        });
        
        $('#submit-button').click(function(){
            $('#the-form').attr('action','<s:url value="/reviewassesment/save.do" />')
            $('#the-form').submit();
        });

        $('#submit-and-save-button').click(function(){
            $('#the-form').attr('action','<s:url value="/reviewassesment/save_and_complete.do" />')
            $('#the-form').submit();
        });
    });
    
</script>

<div class="container">
    <h4><s:text name="review_assesment" /></h4>
    <%@include file="/pages/include/message_display_include.jsp"%>
    <form id="the-form"  class="form-horizontal" method="POST" action='<s:url value="/reviewassesment/save.do"/>'>
        <input type="hidden" name="form.reviewResult.id" value="<s:property value="%{form.reviewResult.id}"/>"/>
        <input type="hidden" name="form.reviewResult.reviewAssignmentId" value="<s:property value="%{form.reviewResult.reviewAssignmentId}"/>"/>
        <input type="hidden" name="form.reviewAssignment.id" value="<s:property value="%{form.reviewAssignment.id}"/>"/>

        <input id="btn-qr-01-field" type="hidden" name="form.reviewResult.qrMark01" value="<s:property value="%{form.reviewResult.qrMark01}"/>"/>
        <input id="btn-qr-02-field" type="hidden" name="form.reviewResult.qrMark02" value="<s:property value="%{form.reviewResult.qrMark02}"/>"/>
        <input id="btn-qr-03-field" type="hidden" name="form.reviewResult.qrMark03" value="<s:property value="%{form.reviewResult.qrMark03}"/>"/>
        <input id="btn-qr-04-field" type="hidden" name="form.reviewResult.qrMark04" value="<s:property value="%{form.reviewResult.qrMark04}"/>"/>
        <input id="btn-qr-05-field" type="hidden" name="form.reviewResult.qrMark05" value="<s:property value="%{form.reviewResult.qrMark05}"/>"/>

        <input id="btn-ev-01-field" type="hidden" name="form.reviewResult.evMark01" value="<s:property value="%{form.reviewResult.evMark01}"/>"/>
        <input id="btn-ev-02-field" type="hidden" name="form.reviewResult.evMark02" value="<s:property value="%{form.reviewResult.evMark02}"/>"/>
        <input id="btn-ev-03-field" type="hidden" name="form.reviewResult.evMark03" value="<s:property value="%{form.reviewResult.evMark03}"/>"/>

        <input id="btn-qw-01-field" type="hidden" name="form.reviewResult.qwMark01" value="<s:property value="%{form.reviewResult.qwMark01}"/>"/>
        <input id="btn-qw-02-field" type="hidden" name="form.reviewResult.qwMark02" value="<s:property value="%{form.reviewResult.qwMark02}"/>"/>


        <div class="row-fluid">
            <div class="span6">
                <div class="control-group">
                    <label class="control-label" ><s:text name="conference_name" /></label>
                    <div class="controls">
                        <input readonly type="text" name="form.reviewAssignment.conferenceAuthor.conference.name" value='<s:property value="form.reviewAssignment.conferenceAuthor.conference.name"/>' >
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" ><s:text name="title" /></label>
                    <div class="controls">
                        <input readonly type="text" name="form.reviewAssignment.title" value='<s:property value="form.reviewAssignment.title"/>' >
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" ><s:text name="description" /></label>
                    <div class="controls">
                        <input readonly type="text" name="form.reviewAssignment.description" value='<s:property value="form.reviewAssignment.description"/>' >
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label" ><s:text name="material" /></label>
                    <div class="controls">
                        <ul>
                            <s:iterator value="form.reviewAssignment.conferenceAuthor.conferenceItems" var="item" status="row">
                                <li>

                                    <a href="<s:url value="/public/download.do"/>?conferenceItem.id=<s:property value="#item.id" />"> <s:property value="#item.fileName"/></a>
                                </li>
                            </s:iterator>
                        </ul>
                    </div>
                </div>    

            </div>

            <div class="span6">
                <div class="control-group">
                    <s:if test="%{not form.reviewAssignment.blindReview}">
                        <label class="control-label" ><s:text name="participants" /></label>
                        <div class="controls">
                            <ul>
                                <s:iterator value="form.reviewAssignment.conferenceAuthor.authors" var="item" status="row">
                                    <li>
                                        <s:property value="#item.userAccount.userInfo.fullName"/>
                                    </li>
                                </s:iterator>
                            </ul>     
                        </div>
                    </s:if>
                </div> 
            </div>
        </div>
        <div class="row-fluid">
            <hr/>

            <table class="table table-bordered">
                <tr>
                    <td colspan="6">
                        <strong>Quality of the Research (25 points)</strong> Use the following rating system: 1 = unacceptable: information is incomplete
                        or absent 2 = marginal: missing key information or description 3 = acceptable: provides some information but not overly
                        informative 4 = good: provides the majority of key information 5 = exceptional: informative and comprehensive
                    </td>
                </tr>

                <tr>
                    <td colspan="6">
                        <strong>1. There is substantial information that is appropriate to the content.</strong> The abstract is formatted using the five (5)
                        headings: Introduction OR Rationale, Objectives, Methods OR Approach, Results OR Practice Implications, Conclusions. For
                        research, results can include projected or preliminary data, if data not yet compiled.
                    </td>
                </tr>

                <tr>
                    <td width="40%"><strong> <small>Content Headings</small> </strong></td>
                    <td  width="12%" class="centralized-text"><strong> <small>Unacceptable</small> </strong><br/></td>
                    <td width="12%" class="centralized-text"><strong> <small>Marginal</small> </strong></td>
                    <td width="12%" class="centralized-text"><strong> <small>Acceptable</small> </strong></td>
                    <td width="12%" class="centralized-text"><strong> <small>Good</small> </strong></td>
                    <td width="12%" class="centralized-text"><strong> <small>Exceptional</small> </strong></td>
                </tr>

                <tr>
                    <td >a) Introduction OR Rationale</td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-01">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-01">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-01">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-01">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-01">5</a> </td>
                </tr>

                <tr>
                    <td >b) Objectives (of project and/or presentation)</td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-02">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-02">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-02">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-02">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-02">5</a> </td>
                </tr>

                <tr>
                    <td >c) Methods OR Approach</td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-03">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-03">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-03">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-03">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-03">5</a> </td>
                </tr>

                <tr>
                    <td >d) Results OR Practice implications</td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-04">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-04">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-04">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-04">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-04">5</a> </td>
                </tr>

                <tr>
                    <td >e) Conclusions</td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-05">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-05">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-05">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-05">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qr-05">5</a> </td>
                </tr>


                <tr>
                    <td colspan="6">
                        <strong>Educational Value (15 points) Use the following rating system:</strong> 1 = low; unacceptable; incomplete; absent 2 <->
                        3 = moderate; acceptable 4 <-> 5 = high; exceptional
                    </td>
                </tr>

                <tr>
                    <td ></td>
                    <td class="centralized-text"><strong> <small>Low</small> </strong><br/></td>
                    <td class="centralized-text"><strong> <small></small> </strong></td>
                    <td class="centralized-text"><strong> <small>Moderate</small> </strong></td>
                    <td class="centralized-text"><strong> <small></small> </strong></td>
                    <td class="centralized-text"><strong> <small>High</small> </strong></td>
                </tr>

                <tr>
                    <td >2. Interest and appeal to an occupational therapy
                        audience (e.g., needs to be heard, occupationbased
                        content, describes historical perspective).</td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-01">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-01">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-01">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-01">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-01">5</a> </td>
                </tr>

                <tr>
                    <td >3. Important contribution to practice, research,
                        theory or knowledge.
                    </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-02">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-02">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-02">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-02">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-02">5</a> </td>
                </tr>

                <tr>
                    <td >4. Novel or innovative contribution (e.g., current trends or new ideas).
                    </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-03">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-03">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-03">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-03">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-ev-03">5</a> </td>
                </tr>

                <tr>
                    <td colspan="6">
                        <strong>Quality of Written Content (10 points) Use the following rating system:</strong> 1 = low; unacceptable;
                        incomplete; absent 2 <-> 3 = moderate; acceptable 4 <-> 5 = high; exceptional
                    </td>
                </tr>

                <tr>
                    <td ></td>
                    <td class="centralized-text"><strong> <small>Low</small> </strong><br/></td>
                    <td class="centralized-text"><strong> <small></small> </strong></td>
                    <td class="centralized-text"><strong> <small>Moderate</small> </strong></td>
                    <td class="centralized-text"><strong> <small></small> </strong></td>
                    <td class="centralized-text"><strong> <small>High</small> </strong></td>
                </tr>

                <tr>
                    <td >5. Self-contained (i.e. should not include
                        abbreviations, acronyms, quotes or extensive
                        reference citations) and concise/specific (i.e., each
                        sentence is maximally informative, especially the
                        lead sentence).
                    </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-01">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-01">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-01">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-01">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-01">5</a> </td>
                </tr>

                <tr>
                    <td >6. Coherent and readable (i.e., written in logical
                        sequence, use of clear vigorous prose, use of the
                        active not passive voice).
                    </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-02">1</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-02">2</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-02">3</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-02">4</a> </td>
                    <td class="centralized-text"> <a href="javascript:void(0);" class="btn btn-qw-02">5</a> </td>
                </tr>

                <tr>
                    <td colspan="6">
                        <h5>Comments to Author</h5>
                        <textarea row="3" name="form.reviewResult.remark01" style="width:80%"><s:property value="%{form.reviewResult.remark01}"/></textarea>

                    </td>
                </tr><tr>
                    <td colspan="6">
                        <h5>Comments to Administrator</h5>
                        <textarea row="3" name="form.reviewResult.remark02" style="width:80%"><s:property value="%{form.reviewResult.remark02}"/></textarea>
                    </td>
                </tr>
            </table>
        </div>

        <div class="row-fluid">
            <hr/>
            <center>
                <a href="<s:url value="/reviewassesment/list.do" />" class="btn btn-danger"><s:text name="cancel"/></a>
                <a href="javascript:void(0);" id="submit-button" class="btn btn-success"><s:text name="save"/></a>
                <a href="javascript:void(0);" id="submit-and-save-button"  class="btn btn-success"><s:text name="save_and_complete"/></a>
            </center>


        </div>            



    </form>




    <br/><br/>


</div>
